package com.djx.business.access.service.impl;

import com.djx.business.access.repository.PermissionRepository;
import com.djx.business.access.service.PermissionService;
import com.djx.entity.access.Permission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Transactional
@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionRepository permissionRepository;

    /**
     * 查询全部权限
     * @return
     */
    @Override
    public List<Permission> permissions() {
        return permissionRepository.findAll();
    }
}
